<?php
session_start();

require 'Shop.php';
?>

<html>
  <head>
    <title>Warenkorb</title>
    <meta charset="UTF-8" />
    <meta name="description" content="In diesem Laden kann man Hosen und Socken kaufen" />
    
     <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="shop.js"></script>
    
    <link href="layout.css" rel="stylesheet" type="text/css" media="screen" />
    
    
  </head>
  <body>
  <div class="header">
    	<a id="login" class="action_button" href="javascript:shop.showLogin()" style="display:none;float:left;">Login</a>
    	<a id="logout" class="action_button" href="javascript:shop.logout()" style="display:none;float:left;">Logout</a>
    	<a class="action_button" href="ShopOverview.php" style="display: block">Zum Shop</a>
    </div>
    <div id="loginForm" style="display:none">
    	<form action="">
    		<input type="text" name="username" id="username">
    		<input type="password" name="password" id="password">
    		<a href="javascript:shop.login()" class="action_button">Login</a> 
    	</form>
    </div>
      <?php 
       if (isset($_SESSION["shop"]))
       {
           $shop = unserialize($_SESSION["shop"]);
           echo $shop->display();
       }
       else 
       {
       	   echo "Shoppingcart empty!";
       }
      ?>    
  </body>
</html>